package com.xzy.seckill.common.result;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
@AllArgsConstructor
/**
 * 统一返回对象参数枚举
 */
public enum ResponseEnum {


    SUCCESS(0,"成功"),
    ERROR(-1,"服务器内部错误"),



    // -1XX服务器错误
    ABNORMAL_REQUEST(-100,"请求错误"),
    BAD_SQL_GRAMMAR_ERROR(-101, "sql语法错误"),
    SERVLET_ERROR(-102, "servlet请求异常"),
    UPLOAD_ERROR(-103, "文件上传错误"),


    //2XX 参数校验错误
    LOGIN_AUTH_ERROR(-201, "未登录"),
    PASSWORD_ERROR(-202,"密码错误"),
    PHONE_REPEAT(-203,"手机号已被注册"),
    NOT_EXIST(-204,"用户不存在"),
    EMPTY_STOCK(-205,"库存不足"),
   REPEAT_ORDER(-206,"重复下单"),
    FAIL_SECKILL(-208,"秒杀失败"),
    REPEAT_req(-207,"重复请求");

    //响应状态码
    private final Integer code;
    //响应信息
    private final String message;
    }
